class Devicegroup {

	//	 Fields	
	String name=''
	String description=''
	
	Date lastUpdated
	Date dateCreated
	
	String geocoderMode='none';
	
	String speedUnits='mph';  
	
	// Fields	
	static hasMany = [devices : Device , geozones:Geozone]	
	static belongsTo = [user:User]
	//static fetchMode = [geozones:"eager"]
	
	int minSpeed
	int maxSpeed
	long maxDormantTime =-1
	
    //FIXME email, sms
	String notifyAction= "email";
	String notifyEmailOrPhone='youremail@xxx.net';
	
	
	boolean toNotifyOverspeed=false	
	boolean toNotifyDormantOverMaxTime=false
	
	//not for Motorola Iden phones
	/*
	boolean toNotifyCityChange=false
	boolean toNotifyStateChange=false
	boolean toNotifyLatitudeDegreeChange=false
	boolean toNotifyLongitudeDegreeChange=false
	*/	

	  //String timeZone;
	  //Date passwdQueryTime;
	  //Date lastLoginTime;
	  //boolean isActive;	
	  
	static constraints = {
			notifyAction(inList:["email","SMS"])
			speedUnits(inList:["mph","kph","knots"])
			geocoderMode(inList:["none","geozone","partial","full"])
				   //FIXME i18n
	
	   //distanceUnits(inList:["Miles","Km","Nm"])	   
	   //volumeUnits(inList:["gal","liter","IG"])
	   //temperatureUnits(inList:["F","C"])
	   
	}
}
